package com.xutong.myfunction.activity;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.WindowManager;

import com.xutong.myfunction.R;

public class MainActivity extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        toolbar.setTitle("列表");
        setSupportActionBar(toolbar);
        if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.KITKAT){
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        }



    }

    public void IntentOnClick(View v){
        Intent intent = new Intent();
        switch (v.getId()){
            case R.id.btnLunBo:
                intent.setClass(MainActivity.this,LunBoActivity.class);
                break;
            case R.id.btnHorSor:
                intent.setClass(MainActivity.this,HorSorActivity.class);
                break;
            case R.id.btnHTTPTest:
                intent.setClass(MainActivity.this,HttpTestActivity.class);
                break;
            case R.id.btnSocket:
                intent.setClass(MainActivity.this,SocketTestActivity.class);
                break;
            case R.id.btnWEBANDJS:
                intent.setClass(MainActivity.this,H5ANDJSActivity.class);
                break;
            case R.id.btnRecyclerView:
                intent.setClass(MainActivity.this,RecyclerViewActivity.class);
                break;
            case R.id.btnCustomView:
                intent.setClass(MainActivity.this,CustomViewActivity.class);
                break;
            case R.id.btnCamera:
                intent.setClass(MainActivity.this,CameraActivity.class);
                break;
            case R.id.btnDesign:
                intent.setClass(MainActivity.this,DesignActivity.class);
                break;
            case R.id.btnSuspension:
                intent.setClass(MainActivity.this,SuspensionActivity.class);
                break;
            case R.id.btnLuckyDraw:
                intent.setClass(MainActivity.this,LuckyDrawActivity.class);
                break;
            case R.id.btnPageIndicator:
                intent.setClass(MainActivity.this,PageIndicatorActivity.class);
                break;
        }
        startActivity(intent);
    }

}
